#ifndef RESOURCE_H
#define RESOURCE_H

#include "Framework/Prerequisites.h"
#include "Framework/ScriptParser/ScriptInterface.h"
#include "Framework/SharedPtr.h"
#include "IO/Resource.h"

namespace tyro
{
	namespace IO
	{
		class Resource : public Framework::ScriptInterface
		{
		public:

			Resource() : resourceManager(0), resHandle(0), memSize(0){}

			Resource(ResourceManager* resMgr, const String& name, ResourceHandle handle, const String& groupName) : resourceManager(resMgr), name(name), resHandle(handle), groupName(groupName), memSize(0) {}

			void Load();

		

			virtual const String& GetName(void) const 
			{
				return name;
			}



		protected:

			// Resource manager
			ResourceManager*	resourceManager;

			// Name of the resource
			String			name;

			// Group name
			String			groupName;

			// Resource handle
			ResourceHandle	resHandle;

			// Size of the resource in bytes
			size_t			memSize;

		private:
		};


		typedef Framework::SharedPtr<Resource> ResourcePtr;

		
	}
}
#endif